package com.financing.platform.task;
import java.sql.SQLException;
import java.util.List;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import com.financing.platform.dto.UserInfoDTO;
import com.financing.platform.service.IManagerLicaishiService;
import com.financing.platform.vo.ManagerLicaishiVO;

@Component(value="licaishiHuishouJob")
public class LicaishiHuishouJob {
	
	Logger log = Logger.getLogger(this.getClass());
	
	@Autowired
	IManagerLicaishiService managerLicaishiService;
	
	//@Scheduled(cron = "0 0 07 * * ?") 
	public void licaishiHuishouJob(){
		UserInfoDTO userInfo=new UserInfoDTO();
		userInfo.setUsername("system");
		userInfo.setUserId("system");
		try {
			List<ManagerLicaishiVO> list=managerLicaishiService.queryManagerLicaishiJob();
			managerLicaishiService.huishouManagerLicaishi(list, userInfo);
		} catch (SQLException e) {
			log.error("huishouManagerLicaishi error",e);
		}
		
		
	}
	
	
}
